//
//  MJViewController.m
//  02.Post上传
//
//  Created by apple on 14-4-29.
//  Copyright (c) 2014年 itcast. All rights reserved.
//

#import "MJViewController.h"
#import "UploadFile.h"

@interface MJViewController ()

@end

@implementation MJViewController

- (void)viewDidLoad
{
    [super viewDidLoad];

    UploadFile *upload = [[UploadFile alloc] init];
    
    NSString *urlString = @"http://localhost/upload.php";
    
    NSString *path = [[NSBundle mainBundle] pathForResource:@"头像1.png" ofType:nil];
    NSData *data = [NSData dataWithContentsOfFile:path];
    
    [upload uploadFileWithURL:[NSURL URLWithString:urlString] data:data];
}

@end
